﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace FiveStone
{
    public partial class RemoteGame : UserControl
    {
        public Boards bd;

        public RemoteGame()
        {
            InitializeComponent();
        }

        private void RemoteGame_Load(object sender, EventArgs e)
        {

        }

        private void RemoteGame_MouseDown(object sender, MouseEventArgs e)
        {
            bd.PersonPut(e.X, e.Y);

            if (historylist.Items.Count == 0)
            {
                historylist.Items.Add(bd.game.st.GetPerson());
                historylist.Items.Add(bd.game.st.GetPC());
            }
            else
            {
                if (historylist.Items[historylist.Items.Count - 1].ToString() != bd.game.st.GetPC() && historylist.Items[historylist.Items.Count - 2].ToString() != bd.game.st.GetPerson())
                {
                    historylist.Items.Add(bd.game.st.GetPerson());
                    historylist.Items.Add(bd.game.st.GetPC());
                }
            }
        }



    }
}
